<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<meta charset="UTF-8"></meta>
	<title>Thông tin quán ăn</title>
	
	<link rel="stylesheet" type="text/css"
		href="resources/css/bootstrap.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/bootstrap-responsive.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/thu-css.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/flexslider.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/font-awesome.css" media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/prettyPhoto.css" media="all" />
	<link rel="stylesheet" type="text/css" href="resources/css/red.css"
		media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/sidebar-nav.css" media="all" />
	<link rel="stylesheet" type="text/css" href="resources/css/style.css"
		media="all" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/icon-css.css" media="all" />
	<link href="resources/css/webwidget_menu_glide.css" rel="stylesheet"
		type="text/css" />
	<link rel="stylesheet" type="text/css"
		href="resources/css/nice-menu.css" media="all" />
	<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
</h:head>

<f:event listener="#{quanAnManageBean.onLoad()}" type="preRenderView"></f:event>

<h:body>

	<!-- Include Header -->
	<ui:include src="./header.xhtml"></ui:include>
	<!-- End Header -->

	<div class="container">
		<!-- Left menu & content -->
		<div class="row" style="margin-left: 0px">
			<div class="row-fluid">
				<div class="row-fluid">

					<!-- Include Left Menu -->
					<ui:include src="./leftMenu.xhtml" />
					<!-- End Left Menu -->

					<!-- Content -->
					<div class="span8 pull-left" style="width: 700px; margin-top: 20px">
					<h:form>
						<center>
							<b><h2>Danh sách thông tin quán ăn</h2></b>
						</center>
						<div
							class="order-table order-table-header order-table-odd-row order-table-even-row">
							<p:dataTable var="list"
								value="#{quanAnManageBean.quanAnListDataModel}" paginator="true"
								rows="10" styleClass="mystyle"
								rowStyleClass="order-table-odd-row,order-table-even-row"
								paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
								rowsPerPageTemplate="5,10,20">
								<p:column headerText="Mã quán ăn">
									<p style="color: red">#{list.maQA}</p>
								</p:column>
								<p:column headerText="Địa chỉ quán ăn">#{list.diaChiQA}</p:column>
								<p:column headerText="Mô tả quán ăn">#{list.moTaQA}</p:column>
								<p:column headerText="Trạng thái duyệt">#{list.trangThaiDuyetQA}</p:column>
								<p:column headerText="Tên chủ QA">#{list.tenTKCQA}</p:column>
								<p:column headerText="Tên Quản trị viên">#{list.taiKhoanQTV}</p:column>
								<p:column headerText="Hình ảnh">
									<p:graphicImage value="#{list.hinhAnhQA}"
										style="width:50px; height: 80px"></p:graphicImage>
								</p:column>
								<p:column headerText="Tùy chọn">
									<h:commandButton actionListener="#{quanAnManageBean.edit()}"
										type="submit" value="Sửa" class="btn btn-warning"
										action="updateQuanAn" />
								</p:column>
							</p:dataTable>
						</div>
						<h2></h2>
						<div></div>
						<center>
							<div>
								<h:commandButton class="btn btn-primary" style="width: 100px"
									action="insertQuanAn" type="submit" value="Thêm mới" />
							</div>
						</center>
					</h:form>
					</div>
					<!-- End Content -->
				</div>
			</div>
		</div>
	</div>

	<!-- Include Footer -->
	<ui:include src="./footer.xhtml"></ui:include>
	<!-- End Footer -->
</h:body>
</html>